#include "common.h"

DirectionType getDirectionByAngle(float angle)
{
	int direction;
	angle -= 67.5f;
	if ( angle < 0.0f ) angle += 360.0f;
	direction = angle / 45;
	if ( direction != DirectionType::UP )
        direction = DirectionType::DIR_LIMIT - direction;
	return (DirectionType)direction;
}